﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using StreetlightGames.SpaceShooter.WaveMetaData;

namespace StreetlightGames.SpaceShooter.Toolbox
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void fileOpenWaveDataFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string path = Environment.CurrentDirectory;
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "XML Files (*.xml)|*.xml";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                WaveDataEditor.ShowForFile(this, ofd.FileName);
            }
            Environment.CurrentDirectory = path;
        }

        private void fileNewWaveDataFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            WaveDataCollection data = new WaveDataCollection();
            data.Add(WaveData.CreateDefault());
            WaveDataEditor.ShowForWaveData(this, data);
        }
    }
}
